<?php
/*
*     蝴蝶数据云采集服务 butterfly_data
*	  @ARPG TEAM. 2013
*	  http://butterfly.arpggame.com
*/

if(!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {
	exit('Access Denied');
}
define('CHARSET',$_G['charset']);
require_once('class/common.php');

$type = addslashes($_GET['type']);


$query = DB::query("SELECT * FROM butterfly_config ORDER BY id");

$onekey_list = array();
$i = 0;
while($value = DB::fetch($query)) {
	$onekey_list[$i][id]     = $value[id];
	$onekey_list[$i][name]   = $value[name];
	$onekey_list[$i][form_site]   = $value[form_site];
	$fid_name  = DB::fetch_first("SELECT name FROM ".DB::table('forum_forum')." WHERE fid = '$value[to_fid]' AND type = 'forum'");
	$onekey_list[$i][to_fid] = $fid_name[name];
    $i++;
}

if ($type == "begin") {





	include template('arpggame_butterfly_data:butterfly_work');
}else{



	include template('arpggame_butterfly_data:butterfly_onekey');
}

